import java.util.Vector;

/**
 * @author gaopeng
 * @date 2019/12/15 3:15 下午
 */
public class User implements IUser {
    private Vector<IUser> vector = new Vector<>();
    private String name;

    public User() {
    }

    public User(String name) {
        this.name = name;
    }

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public void add(IUser user) {
        this.vector.add(user);
    }

    @Override
    public IUserIterator iterator() {
        return new UserIterator(vector);
    }
}
